<template>
  <div class="wrapper">
    {{themeImg}}
    <button @click="changeByVuex">点我，通过Vuex改变</button>
  </div>
</template>

<script>
export default {
  name:"VuexTest",
  components:{},
  props:{},
  data(){
    return {
    }
  },
  watch:{},
  computed:{
    themeImg() {
      return this.$store.state.settings.themeImg
    },
  },
  methods:{
    changeByVuex(){
      this.$store.commit('settings/changeThemeImg', 'https://www.baidu.com/img/bd_logo1.png')
    }
  },
  created(){},
  mounted(){}
}
</script>
<style scoped>
.wrapper{}
</style>